package com.example.demo.loop.domain;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: daiguoqing
 * @Date: 2020-08-31
 * @Time: 14:58
 * @Version: hello-spring-boot 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
     //定义属性
     @JsonSerialize(using = ToStringSerializer.class)
     private long id;
     private String name;
     private String sex;
     private long phone;
     @JsonSerialize(using = ToStringSerializer.class)
     private Long gradeId;
     private String gName;   //班级外键id
     @JsonSerialize(using = ToStringSerializer.class)
     private Long electiveId;
     private String eName;  //学科外键id
     private String address;
}
